/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package library.command;

import java.util.List;
import library.book.Book;
import library.control.ControlProvider;
import library.control.IControlBook;

/**
 *
 * @author MonStar
 */
public class AddCommand implements ICommand {

    private final String ADD = "add";

    @Override
    public String name() {
        return ADD;
    }

    @Override
    public void execute(String... args) {
        List<IControlBook> listControlBook = ControlProvider.getControl().getListControlBook();
        for (IControlBook controlBook : listControlBook) {
            if (controlBook.getName().equals("static")){
                //controlBook.addBook(book);
                controlBook.addBook(new Book());
            }
        }
    }
}